<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>数据分析</title>
    {% load staticfiles %}
    <!-- Bootstrap -->
    <link href="{% static "jian/kan/bootstrap/css/bootstrap.min.css" %}" rel="stylesheet">

    <style>
        .sort {
            cursor: pointer;
        }
    </style>
</head>
<body>
<table class="table table-condensed">
    <tr>
        <th></th>
        <th>用户名</th>
        <th class="sort" onclick="window.location.href='{% url 'kan_data_analyze' %}?sort=1'">推荐个数</th>
        <th class="sort" onclick="window.location.href='{% url 'kan_data_analyze' %}?sort=2'">点击个数</th>
        <th class="sort" onclick="window.location.href='{% url 'kan_data_analyze' %}?sort=3'">CTR(%)</th>
    </tr>
    {% for r in records %}
        <tr>
            <td>{{ forloop.counter }}</td>
            {% for i in r %}
                <td>{{ i }}</td>{% endfor %}</tr>
    {% endfor %}
</table>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="{% static "jian/kan/bootstrap/js/bootstrap.min.js" %}"></script>
</body>
</html>